Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds deprecated.js to sideEffects #7114

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

marklundin
Copy link
Member

@marklundin marklundin commented Nov 14, 2024

The engine is marked as not having sideEffects, however deprecated.js contains numerous side effects.

This has important consequences, as most bundlers will tree-shake/remove deprecated.js in a production build, meaning code can behave differently in production. You can see a repro here https://stackblitz.com/edit/vitejs-vite-t6vvne?file=main.js,vite.config.js,index.html

This PR marks deprecated.js as a sideEffect which is a common indicator to most bundlers not to tree-shake that file.

I confirm I have read the contributing guidelines and signed the Contributor License Agreement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants